// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** getSongFile GET /api/song/file/${param0} */
export async function getSongFileUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getSongFileUsingGETParams,
  options?: { [key: string]: any },
) {
  const { url: param0, ...queryParams } = params;
  return request<API.Resource>(`/api/song/file/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** getSongById GET /api/song/get/${param0} */
export async function getSongByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getSongByIdUsingGETParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResponseSongVO_>(`/api/song/get/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** listSongByPage GET /api/song/list/page */
export async function listSongByPageUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listSongByPageUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageSongVO_>('/api/song/list/page', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** recommendSongs POST /api/song/recommend */
export async function recommendSongsUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.recommendSongsUsingPOSTParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseListSongVO_>('/api/song/recommend', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** searchSongByPage GET /api/song/search */
export async function searchSongByPageUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.searchSongByPageUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageSongVO_>('/api/song/search', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}
